//
//  MonkeyError.cpp
//  Phidgets
//
//  Created by Daniel Hazelbaker on 12/14/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#include "MonkeyError.h"



MonkeyError::MonkeyError(JSErrorReport *error, const char *message)
{
    _lineNumber = error->lineno;
    _filename = std::string((error->filename != NULL ? error->filename : ""));
    _code = std::string((error->linebuf != NULL ? error->linebuf : ""));
    _message = std::string(message);
    _isError = !(error->flags & JSREPORT_WARNING);
}


